using System;
using WebAndLoadTestPluginsAndRules.Common;

namespace HtmlTagInnerTextTests.Common
{
    internal class PredicateFilter : Filter
    {
        private readonly Func<string, bool> _predicate;

        public PredicateFilter(Func<string, bool> predicate)
        {
            _predicate = predicate;
        }

        public override bool Matches(string value)
        {
            return _predicate(value);
        }
    }
}